/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   any later version.                                                    *
 ***************************************************************************/

#include "asuro.h"
int value=80;
unsigned int lData[2];
float r = 0.4;

int main(void) {
	Init();
	FrontLED(ON);
	while (1) {
		LineData(lData);
		int leftLux = (int) lData[LEFT];
		if(leftLux>value){
			StatusLED(RED);
			SetMotorPower(100,(int)100*r);
		}else{
			StatusLED(GREEN);
			SetMotorPower((int)100*r,100);
		}
	}
	while (1)
		;
	return 0;
}
